<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" import="com.zhlb.zfba.common.config.Global"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%
	pageContext.setAttribute("APP_PATH", request.getContextPath());
%>
<%
String IDCardURL=Global.getConfig("IDCardURL");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Access-Control-Allow-Origin" content="*"> 
<title>被询问人信息</title>
<link href="${APP_PATH}/static2/css/style.css" rel="stylesheet"
	type="text/css" />
<link href="${APP_PATH}/static2/css/xilaxuanze.css" rel="stylesheet"
	type="text/css" />

<script type="text/javascript" src="${APP_PATH}/static2/js/jquery.js"></script>
<script src="${APP_PATH}/static2/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<link href="${APP_PATH}/static2/jquery-jbox/2.3/Skins/Bootstrap/jbox.min.css" rel="stylesheet"/>
<script src="${APP_PATH}/static2/jquery-jbox/2.3/jquery.jBox-2.3.min.js" type="text/javascript"></script>
<script type="text/javascript" src="${APP_PATH}/static2/js/mycommon.js"></script>
<script type="text/javascript">
	$(function() {
		//移到右边
		$('#add').click(function() {
			//先判断是否有选中
			if (!$("#select1 option").is(":selected")) {
				alert("请选择需要移动的选项")
			}
			//获取选中的选项，删除并追加给对方
			else {
				$('#select1 option:selected').appendTo('#select2');
			}
		});

		//移到左边
		$('#remove').click(function() {
			//先判断是否有选中
			if (!$("#select2 option").is(":selected")) {
				alert("请选择需要移动的选项")
			} else {
				$('#select2 option:selected').appendTo('#select1');
			}
		});

		//全部移到右边
		$('#add_all').click(function() {
			//获取全部的选项,删除并追加给对方
			$('#select1 option').appendTo('#select2');
		});

		//全部移到左边
		$('#remove_all').click(function() {
			$('#select2 option').appendTo('#select1');
		});

		//双击选项
		$('#select1').dblclick(function() { //绑定双击事件
			//获取全部的选项,删除并追加给对方
			$("option:selected", this).appendTo('#select2'); //追加给对方
		});

		//双击选项
		$('#select2').dblclick(function() {
			$("option:selected", this).appendTo('#select1');
		});

	});
</script>
<script>
	$(function() {
		//全选或全不选
		$("#all").click(function() {
			if (this.checked) {
				$("#list :checkbox").prop("checked", true);
			} else {
				$("#list :checkbox").prop("checked", false);
			}
		});
		//全选  
		$("#selectAll").click(function() {
			$("#list :checkbox,#all").prop("checked", true);
		});
		//全不选
		$("#unSelect").click(function() {
			$("#list :checkbox,#all").prop("checked", false);
		});
		//反选 
		$("#reverse").click(function() {
			$("#list :checkbox").each(function() {
				$(this).prop("checked", !$(this).prop("checked"));
			});
			allchk();
		});

		//设置全选复选框
		$("#list :checkbox").click(function() {
			allchk();
		});

		//获取选中选项的值
		$("#getValue").click(function() {
			var valArr = new Array;
			$("#list :checkbox[checked]").each(function(i) {
				valArr[i] = $(this).val();
			});
			var vals = valArr.join(',');
			alert(vals);
		});
	});
	function allchk() {
		var chknum = $("#list :checkbox").size();//选项总个数
		var chk = 0;
		$("#list :checkbox").each(function() {
			if ($(this).prop("checked") == true) {
				chk++;
			}
		});
		if (chknum == chk) {//全选
			$("#all").prop("checked", true);
		} else {//不全选
			$("#all").prop("checked", false);
		}
	}
</script>
<script>
	/* $(function() {
		$("#shanchu").click(function() {
			$("input[name='test']:checked").each(function() { // 遍历选中的checkbox
				n = $(this).parents("tr").index(); // 获取checkbox所在行的顺序
				$("table#list").find("tr:eq(" + n + ")").remove();
			});
		});
	}); */
</script>
<script type="text/javascript">
	$(document).ready(function() {
		//打开添加模态框
		$("#suspect_add_modal_btn").click(function() {
			$("#suspectAddModal form")[0].reset();
			$("#suspectAddModal").fadeIn(200);
		});
		//打开修改模态框
		$("#suspect_update_modal_btn").click(function() {
			var checkboxs=$("input:checkbox[name='suspectCheckbox']:checked");
			//alert(checkboxs.length);
			if(checkboxs.length!=1){
				alert("请选择一条数据！");
				return false;
			}
			var suspectId=checkboxs.attr("dataId");
			//alert(policeId)
			$("#suspectUpdateModal form")[0].reset();
			getSuspectInfo(suspectId);
			$("#suspectInfo_upodate_btn").attr("dataId",suspectId);
			$("#suspectUpdateModal").fadeIn(200);
		});
		//双击行（tr）,弹出修改按钮
		$("#list tr").dblclick(function(){
			//获取双击行的checkbox的dataID
			var checkboxObj=$(this).find("input:checkbox[name='suspectCheckbox']");
			var suspectId=checkboxObj.attr("dataId");
			//alert(policeId)
			$("#suspectUpdateModal form")[0].reset();
			getSuspectInfo(suspectId);
			$("#suspectInfo_upodate_btn").attr("dataId",suspectId);
			$("#suspectUpdateModal").fadeIn(200);
		});
		//从模态框添加数据
		$("#suspect_add_btn").click(function(){
			if(validate_add_form()==false){
				return ;
			}
			 //收集禁止区域集合
			var banAreas="";
		    var banAreaCheckboxs=$("input:checkbox[name='banAreaCheckboxAdd']");
		    
		    $.each(banAreaCheckboxs, function(index, item) {
		    	if($(item).attr("checked")==true){
				banAreas = banAreas + $(item).val() + ",";
		    	}
			});
			if (banAreas.indexOf(",") != -1) {
				banAreas = banAreas.substring(0, banAreas.length - 1);
			}
			$("#addBanAreas").val(banAreas);
			//发送保存
			document.getElementById("suspect_add_btn").disabled = true;
			$.ajax({
				url:"${APP_PATH}/per/suspectInfo/save",
				type:"post",
				data:$("#suspectAddModal form").serialize(),
				success:function(result){
					//alert(result.msg);
					document.getElementById("suspect_add_btn").disabled = false;
					if(result.code="100"){
						parent.topFrame.location.reload();//刷新top页的在所人数
						$('#suspectAddModal').fadeOut(200);
						to_page(1);
					}else{
						/* if(undefined !=reuslt.extend.errorFields.email){
							show_validate_msg("#empName_add_input","error","用户名2-5位中文或6-16位英文和数组的组合");

						}
						if(undefined !=reuslt.extend.errorFields.empName){
							show_validate_msg("#email_add_input","error","邮箱格式不正确");
						} */
					}
					
				},
				error:function(){
					document.getElementById("suspect_add_btn").disabled = false;
					alert("操作失败：系统异常");
				}
			});
		});
		//点击修改模态框的确定
		$("#suspectInfo_upodate_btn").click(function(){
			if(validate_update_form()==false){
				return ;
			}
			    //收集禁止区域集合
				var banAreas="";
			    var banAreaCheckboxs=$("input:checkbox[name='banAreaCheckbox']");
			    
			    $.each(banAreaCheckboxs, function(index, item) {
			    	if($(item).attr("checked")==true){
					banAreas = banAreas + $(item).val() + ",";
			    	}
				});
				if (banAreas.indexOf(",") != -1) {
					banAreas = banAreas.substring(0, banAreas.length - 1);
				}
				$("#updateBanAreas").val(banAreas);
				document.getElementById("suspectInfo_upodate_btn").disabled = true;
				//保存更新
				$.ajax({
					url:"${APP_PATH}/per/suspectInfo/save?infoGUID="+$(this).attr("dataId"),
					type:"post",
					data:$("#suspectUpdateModal form").serialize(),
					success:function(result){
						document.getElementById("suspectInfo_upodate_btn").disabled = false;
						$('#suspectUpdateModal').fadeOut(200);
						to_page(1)
						},
				error:function(){
					document.getElementById("suspectInfo_upodate_btn").disabled = false;
					alert("操作失败：系统异常");
				}
				});
			});
		//确认离开
		$("#suspectInfo_isLeave_btn").click(function() {
			$.ajax({
				url:"${APP_PATH}/per/suspectInfo/isLeave?infoGUID="+$(this).attr("dataId"),
				type:"post",
				data:$("#suspectIsLeaveModal form").serialize(),
				success:function(result){
					parent.topFrame.location.reload();//刷新top页的在所人数
					$("#suspectIsLeaveModal").fadeOut(100);
					to_page(1);
					}
			}); 
			
		});
/* 		$(".click").click(function() {
			$(".tipyuan").fadeIn(200);
		}); */

		$(".tiptop a").click(function() {
			$(".tipyuan").fadeOut(200);
		});
		$(".tiptop a").click(function() {
			$(".querlk").fadeOut(200);
		});
		
/* 		$(".sure").click(function() {
			$(".tipyuan").fadeOut(100);
		}); */

		$(".cancel").click(function() {
			$(".tipyuan").fadeOut(100);
		});
		$(".leavecancel").click(function() {
			$(".querlk").fadeOut(100);
		});

	});
</script>
<script type="text/javascript">
	$(document).ready(function() {
		/* $(".btn").click(function() {
			$(".querlk").fadeIn(200);
		});

		$(".tiptop a").click(function() {
			$(".querlk").fadeOut(200);
		});

		$(".sure").click(function() {
			$(".querlk").fadeOut(100);
		}); */

		$(".cancel").click(function() {
			$(".querlk").fadeOut(100);
		});
	}); 
</script>
<script type="text/javascript">
	$(document).ready(function() {
		/*添加模态框的事由  */
		//添加模态框的事由 开始
		$(".addAuthTypeClass").click(function() {
			//alert($(this).val());
			var radioAuthType=$(this).val();
			 var banAreaCheckboxs=$("input:checkbox[name='banAreaCheckboxAdd']");
			//$("#add_inquestRoomNo_select");
			var inquestRoomNoObj = document.getElementById("add_inquestRoomNo_select");
			//清空
			 $.each(banAreaCheckboxs, function(index, item) {
		    		$(item).removeAttr("checked");;
			});
			//0.采集信息 :人身检查室 A	信息采集室B 走廊 H 询问室下拉框为空，不允许选择。
			if(radioAuthType=="0"){
				inquestRoomNoObj.options[0].selected = true;//询问室下拉框为空
				//inquestRoomNoObj.disabled=true;
				    $.each(banAreaCheckboxs, function(index, item) {
				    	/* if($(item).val()=="A"||$(item).val()=="B"||$(item).val()=="H"){//人身检查室
				    		$(item).attr("checked",'true');
				    	} */
				    	if($(item).attr("roomtype") == "1"||$(item).attr("roomtype") =="2"||$(item).attr("roomtype") =="7"){
				    		$(item).attr("checked",'true');
				    	}
					});
			}
			//1.询问 :人身检查室,侯问室1C,侯问室2D,侯问室3E,侯问室4F,辨认室G,走廊H,询问室:可选
			if(radioAuthType=="1"){
				//inquestRoomNoObj.options[0].selected = true;//询问室下拉框为空
				inquestRoomNoObj.disabled=false;
				    $.each(banAreaCheckboxs, function(index, item) {
				    	/* if($(item).val()=="A"||$(item).val()=="C"||$(item).val()=="D"
				    			||$(item).val()=="E"||$(item).val()=="F"||$(item).val()=="G"||$(item).val()=="H"){//人身检查室
				    		$(item).attr("checked",'true');
				    	} */
				    	if($(item).attr("roomtype") == "1"||$(item).attr("roomtype") =="3"||$(item).attr("roomtype") =="6"||$(item).attr("roomtype") =="7"){
				    		$(item).attr("checked",'true');
				    	}
					});
			}
			if(radioAuthType=="2"){
				//inquestRoomNoObj.options[0].selected = true;//询问室下拉框为空
				inquestRoomNoObj.disabled=false;
				    $.each(banAreaCheckboxs, function(index, item) {
				    	/* if($(item).val()=="A"||$(item).val()=="B"||$(item).val()=="C"||$(item).val()=="D"
				    			||$(item).val()=="E"||$(item).val()=="F"||$(item).val()=="G"||$(item).val()=="H"){//人身检查室
				    		$(item).attr("checked",'true');
				    	} */
				    	if($(item).attr("roomtype") == "1"||$(item).attr("roomtype") == "2"
				    			||$(item).attr("roomtype") =="3"||$(item).attr("roomtype") =="6"
				    			||$(item).attr("roomtype") =="7"){
				    		$(item).attr("checked",'true');
				    	}
					});
			}
		});
		//询问区下拉框，改变时，对应的允许的区域也要check
		$('#add_inquestRoomNo_select').change(function(){
			var banAreaCheckboxs=$("input:checkbox[name='banAreaCheckboxAdd']");
			var valueStr=$(this).val()
			$.each(banAreaCheckboxs, function(index, item) {
				//alert($(item).val())
				//console.log($(item).val(),valueStr);
		    	if($(item).val()==valueStr){//人身检查室
		    		$(item).attr("checked",'true');
		    	}
			});
		});
		//添加模态框的事由 结束
		//修改模态框的事由 开始
		$(".updateAuthTypeClass").click(function() {
			//alert($(this).val());
			var radioAuthType=$(this).val();
			 var banAreaCheckboxs=$("input:checkbox[name='banAreaCheckbox']");
			//$("#add_inquestRoomNo_select");
			var inquestRoomNoObj = document.getElementById("update_inquestRoomNo_select");
			//清空
			 $.each(banAreaCheckboxs, function(index, item) {
		    		$(item).removeAttr("checked");;
			});
			//0.采集信息 :人身检查室	信息采集室 走廊 询问室下拉框为空，不允许选择。
			 if(radioAuthType=="0"){
					inquestRoomNoObj.options[0].selected = true;//询问室下拉框为空
					//inquestRoomNoObj.disabled=true;
					    $.each(banAreaCheckboxs, function(index, item) {
					    	/* if($(item).val()=="A"||$(item).val()=="B"||$(item).val()=="H"){//人身检查室
					    		$(item).attr("checked",'true');
					    	} */
					    	if($(item).attr("roomtype") == "1"||$(item).attr("roomtype") =="2"||$(item).attr("roomtype") =="7"){
					    		$(item).attr("checked",'true');
					    	}
						});
				}
				//1.询问 :人身检查室,侯问室1,侯问室2,侯问室3,侯问室4,辨认室,走廊,询问室:可选
				if(radioAuthType=="1"){
					//inquestRoomNoObj.options[0].selected = true;//询问室下拉框为空
					inquestRoomNoObj.disabled=false;
					    $.each(banAreaCheckboxs, function(index, item) {
					    	/* if($(item).val()=="A"||$(item).val()=="C"||$(item).val()=="D"
				    			||$(item).val()=="E"||$(item).val()=="F"||$(item).val()=="G"||$(item).val()=="H"){//人身检查室
					    		$(item).attr("checked",'true');
					    	} */
					    	if($(item).attr("roomtype") == "1"||$(item).attr("roomtype") =="3"||$(item).attr("roomtype") =="6"||$(item).attr("roomtype") =="7"){
					    		$(item).attr("checked",'true');
					    	}
						});
				}
				if(radioAuthType=="2"){
					//inquestRoomNoObj.options[0].selected = true;//询问室下拉框为空
					inquestRoomNoObj.disabled=false;
					    $.each(banAreaCheckboxs, function(index, item) {
					    	/* if($(item).val()=="A"||$(item).val()=="B"||$(item).val()=="C"||$(item).val()=="D"
				    			||$(item).val()=="E"||$(item).val()=="F"||$(item).val()=="G"||$(item).val()=="H"){//人身检查室
					    		$(item).attr("checked",'true');
					    	} */
					    	if($(item).attr("roomtype") == "1"||$(item).attr("roomtype") == "2"
				    			||$(item).attr("roomtype") =="3"||$(item).attr("roomtype") =="6"
				    			||$(item).attr("roomtype") =="7"){
				    		$(item).attr("checked",'true');
				    	}
						});
				}
			});
		//询问区下拉框，改变时，对应的允许的区域也要check
		$('#update_inquestRoomNo_select').change(function(){
			var banAreaCheckboxs=$("input:checkbox[name='banAreaCheckbox']");
			var valueStr=$(this).val()
			$.each(banAreaCheckboxs, function(index, item) {
		    	if($(item).val()==valueStr){//人身检查室
		    		$(item).attr("checked",'true');
		    	}
			});
		});
		//修改模态框的事由 结束
		//采集信息
		$("#axq").click(function() {
			$("#riqi").hide();
			$("#xingqi").show();
		});
		//询问
		$("#arq").click(function() {
			$("#riqi").show();
			$("#xingqi").hide();
		});
		//采集信息+询问
		$("#xinxi").click(function() {
			$("#xingqi").show();
			$("#riqi").hide();
		});
		/*修改模态框的事由  */
		//采集信息
		$("#axq_update").click(function() {
			$("#riqi_update").hide();
			$("#xingqi_update").show();
		});
		//询问
		$("#arq_update").click(function() {
			$("#riqi_update").show();
			$("#xingqi_update").hide();
		});
		//采集信息+询问
		$("#xinxi_update").click(function() {
			$("#xingqi_update").show();
			$("#riqi_update").hide();
		});
		//删除
			$("#shanchu").click(function() {
				delSuspects();
		});
		//同案标记
		$("#accompliceSign").click(function() {
			  $.jBox.open(
				        "iframe:${APP_PATH}/per/suspectInfo/listNoPage?isLeave=0", 
				        "同案标记", 1000, 500, 
				        {id:'addTradeProject', buttons: {"关闭":true}, iframeScrolling: 'yes', showClose: true,
				        	submit:function(v,h,f){
				        		if(v == "ok"){
				        		 location.reload();
				        		}
				        	}
				        }
				    ); 
		});
		//添加页面  读取身份证基本信息=====================
		$("#putIDCardInfo_btn_id").click(function(){
			$.ajax({
				url:"<%=IDCardURL%>",
				type:"get",
			    cache:false, 
			    async:false,
			    dataType: 'jsonp',
			    jsonpCallback : 'CallBack',
				success:function(result){
				var DCardINfo=result;
				var datestr=formatDateStr(DCardINfo.Birthday);//格式化生日
				$("#suspectName_add_inpu_id").val(DCardINfo.Name);//姓名
				$("#suspectSex_add_inpu_id").val([DCardINfo.Sex]);//性别
				$("#suspectNation_add_inpu_id").val(DCardINfo.Nation);//民族
				$("#suspectBirth_add_inpu_id").val(datestr);//出生日期
				$("#suspectIDNo_add_inpu_id").val(DCardINfo.IDCode);//身份证号
				$("#suspectArea_add_inpu_id").val(DCardINfo.Address);//户籍地
					},
					error:function(){
						alert("获取身份证信息失败");
					}
				});
		});
		//修改页面 ---读取身份证基本信息=====================
			$("#putIDCardInfo_update_btn_id").click(function(){
			$.ajax({
				url:"<%=IDCardURL%>",
				type:"get",
			    cache:false, 
			    async:false,
			    dataType: 'jsonp',
			    jsonpCallback : 'CallBack',
				success:function(result){
				var DCardINfo=result;
				var datestr=formatDateStr(DCardINfo.Birthday);//格式化生日
				$("#suspectName_update_input").val(DCardINfo.Name);//姓名
				$("#suspectSex_update_input").val([DCardINfo.Sex]);//性别
				$("#suspectNation_update_input").val(DCardINfo.Nation);//民族
				$("#suspectBirth_update_input").val(datestr);//出生日期
				$("#suspectIDNo_update_input").val(DCardINfo.IDCode);//身份证号
				$("#suspectArea_update_input").val(DCardINfo.Address);//户籍地
					},
					error:function(){
						alert("获取身份证信息失败");
					}
				});
		});
		//翻页============================
		var pageInfoJson=${pageInfoJson};
		build_page_nav(pageInfoJson);
	});
	function callback(){
		//alert(result)
	}
	//格式化出生日期 19991234--1999-12-34
	function formatDateStr(dateStr){
		if(dateStr==null||dateStr==""||typeof(dateStr) == "undefined"){
			return null;
		}
		if(dateStr.length<8){
			return dateStr;
		}
		var formatDateStr=dateStr.substring(0,4)+"-"+dateStr.substring(4,6)+"-"+dateStr.substring(6,8);
	     return formatDateStr;
	}
	//装填修改模态框数据
	function getSuspectInfo(id){
		$.ajax({
			url:"${APP_PATH}/per/suspectInfo/getSuspectInfo?infoGUID="+id,
			type:"get",
			success:function(result){
				//$("#policeUpdateModal select").val([result.inquestRoomNo]);
				//禁止区域
				var banAreaCheckboxs=$("input:checkbox[name='banAreaCheckbox']");
				var banAreaArr=[];
				if(result.banArea!=null||result.banArea!=""){
					banAreaArr=result.banArea.split(",");
				}
				
				$.each(banAreaCheckboxs, function(index, item) {
					for(var i=0;i<banAreaArr.length;i++){
						//console.log(banAreaArr[i],$(item).val());
					 if($(item).val()==banAreaArr[i]){
						 $(item).attr("checked",'true');
					 }
					}
				});
				
				$("#suspectName_update_input").val(result.suspectName);
				$("#suspectSex_update_input").val([result.suspectSex]);
				
				$("#suspectNation_update_input").val(result.suspectNation);
				$("#suspectBirth_update_input").val(result.suspectBirth);
				$("#suspectIDNo_update_input").val(result.suspectIDNo);//
				$("#suspectAddress_update_input").val(result.suspectAddress);
				$("#suspectDegree_update_input").val([result.suspectDegree]);//文化程度
				//$("#suspectDegree_update_input").val([result.suspectDegree]);
				$("#suspectNationality_update_input").val(result.suspectNationality);
				$("#suspectPlace_update_input").val(result.suspectPlace);
				$("#cardNo1_update_input").val(result.cardNo1);
				$("#bringPolice_update_input").val(result.bringPolice);
				
				$("#suspectTel_update_input").val(result.suspectTel);
				$("#suspectArea_update_input").val(result.suspectArea);
				$("#suspectStature_update_input").val(result.suspectStature);
				$("#facelFeature_update_input").val(result.facelFeature);
				$("#shapelFeature_update_input").val(result.shapelFeature);
				$("#bloodType_update_input").val([result.bloodType]);//血型
				$("#specialFeature_update_input").val(result.specialFeature);
				$("#supspocious_update_input").val(result.supspocious);
				$("#suspectRemark_update_input").val(result.suspectRemark);
				//authType//事由 S
				//$("#suspectUpdateModal input:radio[name='authType']").val([result.authType]);
				$("#suspectUpdateModal input:radio[name='authType']").each(
				function(){
					if($(this).val()==result.authType){
						$(this).attr("checked",true);
					}
				}		
				);
				if(result.authType=="0"){
					var inquestRoomNoObj = document.getElementById("update_inquestRoomNo_select");
					inquestRoomNoObj.options[0].selected = true;//询问室下拉框为空
					//inquestRoomNoObj.disabled=true;
				}

				//E
				//询问室
				//$("#suspectUpdateModal select").val([result.inquestRoomNo]);
				$("#update_inquestRoomNo_select").val([result.inquestRoomNo]);
				//inquestRoomNo//询问室
				//禁止区域
				
				$("#banArea_update_input").val(result.banArea);
				$("#bagNo_update_input").val(result.goodsInfo.bagNo);
				$("#cupboardNo_update_input").val(result.goodsInfo.cupboardNo);
				$("#recvPerson_update_input").val(result.goodsInfo.recvPerson);
				$("#recvTimeupdate_input").val(result.goodsInfo.recvTime);
				$("#goodsInfoupdate_input").val(result.goodsInfo.goodsInfo);
				$("#fillInNameupdate_input").val(result.fillInName);
			}
		});
	}

	//批量删除
	function delSuspects() {
		var ids = "";
		var checkboxs = $("input:checkbox[name='suspectCheckbox']:checked");
		//alert(checkboxs.length);
		if (checkboxs.length < 1) {
			alert("请至少选择一条数据！");
			return false;
		}
		var r = confirm("确定要删除吗？")
		if (r == false) {
			return;
		}
		$.each(checkboxs, function(index, item) {
			ids = ids + $(item).attr("dataId") + ","
		});
		if (ids.indexOf(",") != -1) {
			ids = ids.substring(0, ids.length - 1);
		}
		//删除
		$.ajax({
			url : "${APP_PATH}/per/suspectInfo/delete",
			type : "post",
			data : {
				'ids' : ids
			},
			success : function(result) {
				parent.topFrame.location.reload();//刷新top页的在所人数
				//$('#policeUpdateModal').fadeOut(200);
				to_page(1)
			}

		});
	}
	//翻页开始
	function to_page(n) {
		$("#pageNo").val(n);
		$("#searchForm").submit();
		return false;
	}
	function build_page_nav(pageInfo) {
		//$("#page_info_nav").empty();
		totalrecord = pageInfo.pages;
		var ul = $("#pageInfoId");
		ul.empty();
		var firstPageLi = $("<li></li>").addClass("paginItem").append(
				$("<a ></a>").append("首页").attr("href", "javascript:;"));
		var prePageLi = $("<li></li>").addClass("paginItem").append(
				$("<a href='javascript:;'></a>").append("&laquo;"));
		if (pageInfo.hasPreviousPage == false) {
			firstPageLi.addClass("disabled");
			prePageLi.addClass("disabled");
		} else {
			firstPageLi.click(function() {
				to_page(1);
			});
			prePageLi.click(function() {
				to_page(pageInfo.pageNum - 1);
			});
		}

		var nextPageLi = $("<li></li>").addClass("paginItem").append(
				$("<a href='javascript:;'></a>").append("&raquo;"));
		var lastPageLi = $("<li></li>").addClass("paginItem")
				.append(
						$("<a href='javascript:;'></a>").append("尾页").attr(
								"href", "#"));
		if (pageInfo.hasNextPage == false) {
			nextPageLi.addClass("disabled");
			lastPageLi.addClass("disabled");
		} else {
			nextPageLi.click(function() {
				to_page(pageInfo.pageNum + 1);
			});
			lastPageLi.click(function() {
				to_page(pageInfo.pages);
			});
		}

		ul.append(firstPageLi).append(prePageLi);
		$.each(pageInfo.navigatepageNums, function(index, item) {
			var numLi = $("<li></li>").addClass("paginItem").append(
					$("<a href='javascript:;'></a>").append(item));
			if (pageInfo.pageNum == item) {
				numLi.addClass("current");
			}
			numLi.click(function() {
				to_page(item);
			});
			ul.append(numLi);
		});
		ul.append(nextPageLi).append(lastPageLi);
		ul.appendTo("#page_info_nav");
	}
	//翻页结束
	//确认离开
	function isLeave(id){

	$("#suspectIsLeaveModal form")[0].reset();
	$("#suspectInfo_isLeave_btn").attr("dataId",id);
	$("#suspectIsLeaveModal").fadeIn(200);

}
</script>
<style type="text/css">
/* 修饰页码*/
.disabled{
    cursor: not-allowed;
    background-color: #eee;
    opacity: 1;
    color: #737373 !important;
}
.disabled a{
color: #737373 !important;}
.oddColor{background:#CD7054;}
.evenColor{
	background:#4682B4;
}

.selectClass{
background-color: #E6E6E6;
 width: 120px; 
 padding-left: 5px;
 line-height: 25px;
 height:25px;
}
.requiedCss{
display:inline;
/* float:left; */
color:red;
}
.banAreaDivItem{
	width:90px; 
	/* border:1px solid #BBFFFF; */
	float:left !important; 
	height:20px;
	line-height:20px;"
}
.textleft{
text-align: right;
padding-right:3px;
}
   .title{ 
    text-align: left !important;
    border-bottom: #999 1px solid;
    padding-top:0 !important; 
    height:15px !important; 
    }
     .title1{ 
    text-align: left !important;
    border-bottom: #999 1px solid;
    height:15px !important; 
    }
    .querlk{
     height:400px;
    }
</style>
</head>
<body>
	<div class="place">
		<ul class="placeul">

			<li>被询问人信息</li>
		</ul>
	</div>
	<!-- 列表开始 -->
	<div class="rightinfo">
	<form:form id="searchForm" modelAttribute="policeInfo" action="${APP_PATH}/per/suspectInfo/list" method="post">
    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
    <input id="isLeave" name="isLeave" type="hidden" value="0"/>
	</form:form>
		<div class="tools">
			<ul class="toolbar">
				<li id="suspect_add_modal_btn"><span><img
						src="${APP_PATH}/static2/images/t01.png" /></span>添加</li>
				<li id="suspect_update_modal_btn"><span><img
						src="${APP_PATH}/static2/images/t02.png" /></span>修改</li>
				<li id="shanchu"><span><img
						src="${APP_PATH}/static2/images/t03.png" /></span>删除</li>
				<li id="accompliceSign"><span><img src="${APP_PATH}/static/images/t02.png" /></span>同案标记</li>
			</ul>
		</div>
		<table class="imgtable" id="list" rules=rows>
			<tr class="imgtable1">
			    <th width="60px;">序号</th>
				<th width="60px;">选择</th>
				<th>姓名</th>
				<th>性别</th>
				<th>询问室</th>
				<th>登记时间</th>
				<th>当前位置</th>
				<th>携带民警</th>
				<th>确认离开</th>
			</tr>
			<c:forEach items="${pageInfo.list}" var="suspectInfo" varStatus="pageList">
				<tr class="${suspectInfo.trbkclass}">
				    <td>${(pageInfo.pageNum - 1) * pageInfo.pageSize + pageList.index + 1}</td>
					<td class="imgtd"><input type="checkbox"
						name="suspectCheckbox" dataId="${suspectInfo.infoGUID}"></td>
					<td>${suspectInfo.suspectName}</td>
					<td>${suspectInfo.suspectSex}</td>
					<td>${suspectInfo.roomInfo.roomName}</td>
					<td>${suspectInfo.inTime}</td>
					<td>${suspectInfo.curPostion}</td>
					<td>${suspectInfo.bringPolice}</td>
					<td><input name="button2" type="button" class="btn" 
						id="" value="确认离开" onclick="isLeave('${suspectInfo.infoGUID}')"/></td>
				</tr>
			</c:forEach>
		</table>
		<div class="pagin">
			<div class="message">
				当前显示第&nbsp;<i class="blue">${pageInfo.pageNum}&nbsp;</i>页,共<i class="blue">${pageInfo.pages}</i>页,共<i class="blue">${pageInfo.total}</i>条记录，
			</div>
			<ul id="pageInfoId" class="paginList">
				<li class="paginItem"><a href="javascript:;"><span
						class="pagepre"></span></a></li>
				<li class="paginItem"><a href="javascript:;">1</a></li>
				<li class="paginItem current"><a href="javascript:;">2</a></li>
				<li class="paginItem"><a href="javascript:;">3</a></li>
				<li class="paginItem"><a href="javascript:;">4</a></li>
				<li class="paginItem"><a href="javascript:;">5</a></li>
				<li class="paginItem more"><a href="javascript:;">...</a></li>
				<li class="paginItem"><a href="javascript:;">10</a></li>
				<li class="paginItem"><a href="javascript:;"><span
						class="pagenxt"></span></a></li>
			</ul>
		</div>
	</div>
	<!-- 列表结束 -->
	<!-- 添加模态框 -->
	<div class="tipyuan" id="suspectAddModal">
		<div class="tiptop">
			<span>添加被询问人信息</span><a></a>
		</div>
		<div style="height: 20px"></div>
		<form>
		<table width="800" border="1" class="zdgl" style="margin: auto">
			<tr>
				<td colspan="12" class="title">基本信息：</td>
			</tr>
			<tr>
				<td class="textleft"><span class="requiedCss">*</span>姓名</td>
				<td colspan="2">
					<input name="suspectName" type="text" maxlength="10" id="suspectName_add_inpu_id"/>
				</td>
				<td class="textleft"><span class="requiedCss">*</span>性别</td>
				<td  colspan="2">
				<select name="suspectSex" class="selectClass" id="suspectSex_add_inpu_id">
					<option value=""></option>
					<option value="男">男</option>
					<option value="女">女</option>
				</select>
				</td>
				<td class="textleft"><span class="requiedCss">*</span>出生年月</td>
				<td colspan="2">
					<input name="suspectBirth" type="text" id="suspectBirth_add_inpu_id" readonly="readonly"class="input-medium Wdate required" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
				</td>
				<td class="textleft"><span class="requiedCss">*</span>身份证号</td>
				<td colspan="2"><input name="suspectIDNo" type="text" maxlength="30" id="suspectIDNo_add_inpu_id"/></td>
			</tr>
			<tr>
				<td class="textleft"><span class="requiedCss">*</span>户籍地</td>
				<td colspan="5">
				 <input name="suspectArea" type="text" style="width:313px" maxlength="32" id="suspectArea_add_inpu_id"/></td>
 				<td class="textleft">民族</td>
				<td colspan="2">
					<input name="suspectNation" type="text" id="suspectNation_add_inpu_id" style="padding-left:4px;width:116px;" maxlength="20"/>
				</td>
				<td class="textleft">国籍</td>
				<td colspan="2">
					<input name="suspectNationality" type="text" maxlength="20"/>
					</td>
			</tr>
			<tr>
				<td class="textleft">住址</td>
				<td colspan="5">
				   <input name="suspectAddress" type="text" style="width: 313px" maxlength="30"/>
		 		</td>
				
				<td class="textleft">文化程度</td>
				<td colspan="2">
					<select name="suspectDegree" class="selectClass">
						<option value=""></option>
						<option value="小学">小学</option>
						<option value="初中">初中</option>
						<option value="高中">高中</option>
						<option value="中专">中专</option>
						<option value="专科">专科</option>
						<option value="本科">本科</option>
						<option value="研究生">研究生</option>
						<option value="其他">其他</option>
					</select>
				</td>
				
				<td class="textleft">联系方式</td>
				<td colspan="2"><input name="suspectTel" type="text" maxlength="20"/></td>
			</tr>
			<tr>
				<td colspan="12" style="text-align:center">
				 <input name="putIDCardINfo" id="putIDCardInfo_btn_id" type="button" class="sure" style="height:30px;line-height: 30px" value="读取身份证信息"/>
				</td>
			</tr>
							
		    <tr>
				<td colspan="12" class="title" >体貌特征：</td>
			</tr>
			
			<tr>
				<td class="textleft">身高(cm)</td>
				<td colspan="2" ><input name="suspectStature" type="text" maxlength="10"/></td>
				<td class="textleft">脸型</td>
				<td colspan="2">
					<input name="facelFeature" type="text" maxlength="20"/>
					</td>
				<td class="textleft">体型</td>
				<td colspan="2"><input name="shapelFeature" type="text" maxlength="20"/></td>
				<td class="textleft">血型</td>
				<td colspan="2">
					<select name="bloodType" class="selectClass">
						<option value=""></option>
						<option value="A">A</option>
						<option value="AB">AB</option>
						<option value="B">B</option>
						<option value="O">O</option>
					</select>
					</td>
			</tr>
			<tr>
				<td class="textleft">特殊特征</td>
				<td colspan="5">
					<input name="specialFeature" type="text" style="width:313px" maxlength="30"/>
				</td>
				<td class="textleft">可疑依据</td>
				<td colspan="2"><input name="supspocious" type="text" maxlength="25"/></td>
				<td class="textleft">备注</td>
				<td colspan="2"><input name="suspectRemark" type="text"
					 maxlength="25"/></td>
			</tr>
			<tr>
				<td colspan="12" class="title1">发卡：</td>
			</tr>
			<tr>
				<td class="textleft"><span class="requiedCss">*</span>发卡<br>卡号</td>
				<td colspan="2"><input name="cardNo1" type="text" maxlength="20" id="cardNo1_add_inpu_id"/></td>
				<td class="textleft"><span class="requiedCss">*</span>携带民警</td>
				<td  colspan="2">
				<input name="bringPolice" type="text" maxlength="30" id="bringPolice_add_inpu_id"/></td>
				<td colspan="6"></td>
			</tr>
			<tr>
				<td class="textleft">事由：</td>
				<td colspan="5" class="textrido">
					<label> 
						<input type="radio" style=" vertical-align:middle;" name="authType" value="0" class="addAuthTypeClass" id="arq_update">
						 采集信息
				    </label> 
				    <label> 
				    	<input type="radio" name="authType" style=" vertical-align:middle;" class="addAuthTypeClass" id="axq_update" value="1">
				    	 询问
				    </label> 
				    <input type="radio" name="authType" style=" vertical-align:middle;"  class="addAuthTypeClass" id="xinxi_update" value="2">
					采集信息+询问
				</td>
				<td class="textleft"><span class="kv-content">询问室</span></td>
			    <td  colspan="2">
					<label for="select"></label>
						<select name="inquestRoomNo" id="add_inquestRoomNo_select"
						class="selectClass">
							<option value =""></option>
							<c:forEach items="${inquestRoomInfoList}" var="inquestRoomInfo" varStatus="pageList">
							<option value ="${inquestRoomInfo.roomID}">${inquestRoomInfo.roomName}</option>
						   </c:forEach>
					     </select>
				</td>
				<td colspan="6"></td>
			</tr>
		 <tr style="width:580px;">
				<td class="textleft">允许区域</td>
				<td colspan="12" class="textrido" >
					<input type="hidden" name="banArea" id="addBanAreas"/>
				  	<div id="banAreaDiv" style="width:555px; overflow:auto;">
						<c:forEach items="${permitRoomInfoList}" var="roomInfo">
							<div class="banAreaDivItem">
								<input type="checkbox" roomtype="${roomInfo.roomType}" style=" vertical-align:middle;" name="banAreaCheckboxAdd" value="${roomInfo.roomID}" id="CheckboxGroup1">
								  ${roomInfo.roomName}
							</div>
						</c:forEach>
					</div>
				</td>
		    </tr> 
			<tr>
				<td colspan="12" class="title1">物品管理：</td>
			</tr>
			<tr>
				<td class="textleft">自封袋号</td>
				<td colspan="2"><input name="goodsInfo.bagNo" type="text" maxlength="20"/></td>
				<td class="textleft">储物柜号</td>
				<td colspan="2"><input name="goodsInfo.cupboardNo" type="text" maxlength="20"/></td>
				<td class="textleft">接收人</td>
				<td colspan="2"><input name="goodsInfo.recvPerson" type="text" maxlength="20"/></td>
				<td class="textleft">接收时间</td>
				<td colspan="2"><input name="goodsInfo.recvTime" type="text"maxlength="20" readonly="readonly"class="input-medium Wdate required" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/></td>
				
			</tr>
			<tr>
				<td class="textleft">物品内容</td>
				<td colspan="5" >
					<textarea name="goodsInfo.goodsInfo" cols=""rows=""
						style="width: 313px; height: 50px; background-color: #e2f3ff" maxlength="200"></textarea></td>
			
				<td class="textleft"><span class="requiedCss">*</span>填表人</td>
				<td colspan="2"><input name="fillInName" type="text" id="fillInName_add_input_id" maxlength="20"/></td>
				<td colspan="3"></td>
			</tr>
		</table>
		</form>
		<div class="tipinfo" style="margin-left:0;">
			<div class="tipxyr" style="margin-left:330px">
				<input name="" type="button" class="sure" id="suspect_add_btn" value="添加" /> &nbsp; <input
					name="" type="button" class="cancel" value="取消" />
			</div>
		</div>
	</div>
	<!-- 添加模态框 结束 -->
	<!-- 修改模态框 开始-->
	<div class="tipyuan" id="suspectUpdateModal">
		<div class="tiptop">
			<span>修改被询问人信息</span><a></a>
		</div>
		<div style="height: 20px"></div>
		<form>
		<table width="800" border="1" class="zdgl" style="margin: auto">
			<tr>
				<td colspan="12" class="textleft1">基本信息：</td>
			</tr>
			<tr>
				<td class="textleft"><span class="requiedCss">*</span>姓名</td>
				<td colspan="2"><input name="suspectName" type="text" maxlength="10" id="suspectName_update_input"/></td>
				<td class="textleft"><span class="requiedCss">*</span>性别</td>
				<td colspan="2">
					<select name="suspectSex" class="selectClass" id="suspectSex_update_input">
						<option value=""></option>
						<option value="男">男</option>
						<option value="女">女</option>
					</select>
					</td>
				<td class="textleft"><span class="requiedCss">*</span>出生年月</td>
				<td colspan="2"><input name="suspectBirth" type="text" id="suspectBirth_update_input" class="input-medium Wdate required" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/></td>
				<td class="textleft"><span class="requiedCss">*</span>身份证号</td>
				<td colspan="2"><input name="suspectIDNo" type="text" maxlength="30" id="suspectIDNo_update_input"/></td>
			</tr>
			<tr>
				<td class="textleft"><span class="requiedCss">*</span>户籍地</td>
				<td colspan="5">
				<input name="suspectArea" type="text"
					style="width: 313px" maxlength="32" id="suspectArea_update_input" /></td>
				<td class="textleft">民族</td>
				<td colspan="2">
					<input name="suspectNation" type="text"  style="padding-left:4px;width:116px;" maxlength="20" id="suspectNation_update_input"/>
				</td>
				
				
				<td class="textleft">国籍</td>
				<td colspan="2">
					<input name="suspectNationality" type="text" maxlength="20" id="suspectNationality_update_input"/></td>
			</tr>
			
				
			<tr>
				<td class="textleft">住址</td>
				<td colspan="5">
					<input name="suspectAddress" type="text" maxlength="30"
						style="width:313px" id="suspectAddress_update_input"/>
				</td>
				<td class="textleft">文化程度</td>
				<td colspan="2">
					<select name="suspectDegree" class="selectClass" id="suspectDegree_update_input">
							<option value=""></option>
							<option value="小学">小学</option>
							<option value="初中">初中</option>
							<option value="高中">高中</option>
							<option value="中专">中专</option>
							<option value="专科">专科</option>
							<option value="本科">本科</option>
							<option value="研究生">研究生</option>
							<option value="其他">其他</option>
						</select>
				</td>
				<td class="textleft">联系方式</td>
				<td colspan="2">
					<input name="suspectTel" type="text" maxlength="20"  id="suspectTel_update_input"/>
				</td>
			</tr>
			<tr>
				<td colspan="12" style="text-align: center">
				<input name="putIDCardINfo" id="putIDCardInfo_update_btn_id" type="button" style="height:30px;line-height: 30px" class="sure" value="读取身份证信息"/>
				</td>
			</tr>

			<tr>
				<td colspan="12" class="title">体貌特征：</td>
			</tr>
			 <tr>
				<td class="textleft">身高(cm)</td>
				<td colspan="2"><input name="suspectStature" type="text" maxlength="10" id="suspectStature_update_input"/></td>
				<td class="textleft">脸型</td>
				<td colspan="2"><input name="facelFeature" maxlength="20" type="text" id="facelFeature_update_input"/></td>
				<td class="textleft">体型</td>
				<td colspan="2"><input name="shapelFeature" type="text" maxlength="20" id="shapelFeature_update_input"/></td>
				<td class="textleft">血型</td>
				<td colspan="2">
					<select name="bloodType" class="selectClass" id="bloodType_update_input">
						<option value=""></option>
						<option value="A">A</option>
						<option value="AB">AB</option>
						<option value="B">B</option>
						<option value="O">O</option>
					</select>
				</td>
							
			<tr>
				<td class="textleft">特殊特征</td>
				<td colspan="5" >
					<input name="specialFeature" type="text"
						style="width: 313px" maxlength="25" id="specialFeature_update_input"/></td>
			
				<td class="textleft">可疑依据</td>
				<td colspan="2" >
					<input name="supspocious" type="text" maxlength="25" id="supspocious_update_input"/></td>
				<td class="textleft">备注</td>
				<td colspan="2" ><input name="suspectRemark" type="text"
					 maxlength="25" id="suspectRemark_update_input"/></td>
			</tr>
			<tr>
				<td colspan="12" class="title1">发卡：</td>
			</tr>
			<tr>
				<td class="textleft"><span class="requiedCss">*</span>发卡<br>卡号</td>
				<td colspan="2"><input name="cardNo1" type="text" maxlength="20" id="cardNo1_update_input"/></td>
				<td class="textleft"><span class="requiedCss">*</span>携带民警</td>
				<td  colspan="2">
					<input name="bringPolice" type="text" maxlength="30" id="bringPolice_update_input" /></td>
				<td colspan="6"></td>	
			</tr>
			<tr>
				
				<td class="textleft">事由：</td>
				<td colspan="5" class="textrido">
					<label> 
						<input type="radio" name="authType" style="vertical-align:middle;" value="0" class="updateAuthTypeClass" id="arq_update">
						 采集信息
				    </label> 
				    <label> 
				    	<input type="radio" name="authType"  style="vertical-align:middle;" class="updateAuthTypeClass" id="axq_update" value="1">
				    	 询问
				    </label> 
				    <input type="radio" name="authType" style="vertical-align:middle;" class="updateAuthTypeClass" id="xinxi_update" value="2">
					采集信息+询问
				</td>
				<td class="textleft"><span class="kv-content">询问室</span></td>
				<td colspan="2">
						<label for="select" ></label>
							<select name="inquestRoomNo" id="update_inquestRoomNo_select"
							class="selectClass">
								<option value =""></option>
								<c:forEach items="${inquestRoomInfoList}" var="inquestRoomInfo" varStatus="pageList">
								<option value ="${inquestRoomInfo.roomID}">${inquestRoomInfo.roomName}</option>
							   </c:forEach>
						</select></td>	
				<td colspan="3"></td>
			</tr>
			
			<tr>
				<td class="textleft" >允许区域</td>
				<td colspan="11" class="textrido">
					<input type="hidden"  name="banArea" id="updateBanAreas">
					<div id="banAreaDiv" style="width:555px; overflow:auto;">
							<c:forEach items="${permitRoomInfoList}" var="roomInfo">
								<div class="banAreaDivItem">
									<input type="checkbox" roomtype="${roomInfo.roomType}" style="vertical-align:middle;"  name="banAreaCheckbox" value="${roomInfo.roomID}" id="CheckboxGroup1">
									  ${roomInfo.roomName}
								</div>
							</c:forEach>
					</div>
				</td>
			</tr>
			<tr>
			<td colspan="12" class="title1">物品管理：</td>
			</tr>
			<tr>
				<td class="textleft">自封袋号</td>
				<td colspan="2"><input name="goodsInfo.bagNo" type="text" maxlength="25" id="bagNo_update_input"/></td>
				<td class="textleft">储物柜号</td>
				<td colspan="2""><input name="goodsInfo.cupboardNo" maxlength="25" type="text" id="cupboardNo_update_input"/></td>
				<td class="textleft">接收人</td>
				<td colspan="2"><input name="goodsInfo.recvPerson" type="text" maxlength="25" id="recvPerson_update_input"/></td>
				<td class="textleft">接收时间</td>
				<td colspan="5"><input name="goodsInfo.recvTime" maxlength="20" type="text" id="recvTimeupdate_input" readonly="readonly"class="input-medium Wdate required" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/></td>
			</tr>
			<tr>
				<td class="textleft">物品内容</td>
				<td colspan="5">
					<textarea name="goodsInfo.goodsInfo" cols="" maxlength="200"
							rows=""
							id="goodsInfoupdate_input"
							style="width: 313px; height: 50px; background-color: #e2f3ff"></textarea>
				</td>
				<td class="textleft"><span class="requiedCss">*</span>填表人</td>
				<td colspan="2">
					<input name="fillInName" type="text" maxlength="10" id="fillInNameupdate_input"/>
				</td>
				<td colspan="3" ></td>
			</tr>
		</table>
		</form>
		<div class="tipinfo" style="margin-left:0;">
			<div class="tipxyr" style="margin-left:330px">
				<input name="" type="button" class="sure" id="suspectInfo_upodate_btn" value="确认修改" /> &nbsp; <input
					name="" type="button" class="cancel" value="取消" />
			</div>
		</div>
	</div>
	<!-- 修改模态框 结束 -->
	<!--确认离开开始-->
	<div class="querlk" id="suspectIsLeaveModal">
		<div class="tiptop">
			<span>确认离开</span><a></a>
		</div>
		<div style="height: 20px"></div>
		<!--确认离开表单内容-->
		<form>
		<div class="formbody">
			<ul class="forminfo">
				<li><label>离开原因</label> <input name="leaveReason" type="text"
					class="dfinput" /></li>
				<li><label>带离人员</label><input name="leaveBringName" type="text"
					class="dfinput" /></li>
				<li><label>处理结果</label><input name="processedResult" type="text"
					class="dfinput" /></li>
			</ul>
		</div>
		</form>
	<!--确认离开表单内容-->
		<div class="tipinfo">
			<span><img src="${APP_PATH}/static2/images/ticon.png" /></span>
			<div class="tipright">
				<p>是否确认离开 ？</p>
				<cite>如果是请点击确定按钮 ，否则请点取消。</cite>
			</div>
			<div class="tipxyr">
				<input name="" type="button" class="sure" value="确认离开" id="suspectInfo_isLeave_btn"/> &nbsp; <input
					name="" type="button" class="cancel leavecancel" value="取消" />
			</div>
		</div>
		<!--确认离开-->
		</div>
		</body>
<script type="text/javascript">
//点击修改时，验证表单
function validate_update_form(){
	var suspectName=$("#suspectName_update_input").val();
	var suspectSex=$("#suspectSex_update_input").val();
	var suspectBirth=$("#suspectBirth_update_input").val();
	var suspectIDNo=$("#suspectIDNo_update_input").val();
	var suspectArea=$("#suspectArea_update_input").val();
	var cardNo1=$("#cardNo1_update_input").val();
	var bringPolice=$("#bringPolice_update_input").val();
	var fillInName =$("#fillInNameupdate_input").val();
	//姓名 //性别  //出生年月 //*身份证号 *户籍地 //发卡卡号//携带民警
	if(suspectName==""||suspectName==null){
		show_validate_msg("姓名不能为空！");
		return false;
	}
	if(suspectSex==""||suspectSex==null){
		show_validate_msg("性别不能为空！");
		return false;
	}
	if(suspectBirth==""||suspectBirth==null){
		show_validate_msg("出生年月不能为空！");
		return false;
	}
	if(suspectIDNo==""||suspectIDNo==null){
		show_validate_msg("身份证号不能为空！");
		return false;
	}
	var regSuspectIDNo = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
		if(!regSuspectIDNo.test(suspectIDNo)){
		show_validate_msg("身份证号格式不正确！");
						return false;
			}
	if(suspectArea==""||suspectArea==null){
		show_validate_msg("户籍地不能为空！");
		return false;
	}
	if(cardNo1==""||cardNo1==null){
		show_validate_msg("发卡卡号不能为空！");
		return false;
	}
	if(validate_CardNo1(cardNo1)==false){
		show_validate_msg("发卡卡号未注册！");
		return false;
	}
	if(bringPolice==""||bringPolice==null){
		show_validate_msg("携带民警不能为空！");
		return false;
	}
	if(fillInName==""||fillInName==null){
		show_validate_msg("填表人不能为空！");
		return false;
	}
	return true;
}
//点击添加时，验证表单
function validate_add_form(){
	var suspectName=$("#suspectName_add_inpu_id").val();
	var suspectSex=$("#suspectSex_add_inpu_id").val();
	var suspectBirth=$("#suspectBirth_add_inpu_id").val();
	var suspectIDNo=$("#suspectIDNo_add_inpu_id").val();
	var suspectArea=$("#suspectArea_add_inpu_id").val();
	var cardNo1=$("#cardNo1_add_inpu_id").val();
	var bringPolice=$("#bringPolice_add_inpu_id").val();
	var fillInName=$("#fillInName_add_input_id").val();
	//姓名 //性别  //出生年月 //*身份证号 *户籍地 //发卡卡号//携带民警
	if(suspectName==""||suspectName==null){
		show_validate_msg("姓名不能为空！");
		return false;
	}
	if(suspectSex==""||suspectSex==null){
		show_validate_msg("性别不能为空！");
		return false;
	}
	if(suspectBirth==""||suspectBirth==null){
		show_validate_msg("出生年月不能为空！");
		return false;
	}
	if(suspectIDNo==""||suspectIDNo==null){
		show_validate_msg("身份证号不能为空！");
		return false;
	}
	var regSuspectIDNo = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
		if(!regSuspectIDNo.test(suspectIDNo)){
		show_validate_msg("身份证号格式不正确！");
						return false;
			}
	if(suspectArea==""||suspectArea==null){
		show_validate_msg("户籍地不能为空！");
		return false;
	}
	if(cardNo1==""||cardNo1==null){
		show_validate_msg("发卡卡号不能为空！");
		return false;
	}
	if(validate_CardNo1(cardNo1)==false){
		show_validate_msg("发卡卡号未注册！");
		return false;
	}
	if(bringPolice==""||bringPolice==null){
		show_validate_msg("携带民警不能为空！");
		return false;
	}
	if(fillInName==""||fillInName==null){
		show_validate_msg("填表人不能为空！");
		return false;
	}
	return true;
}
//ajax校验，发卡卡号1.是否存在
function validate_CardNo1(cardNo1){
	
	var policeCardNo1flag=true;
	$.ajax({
		url:"${APP_PATH}/card/cardRegInfo/isExsitCardNo",
		type:"post",
		 cache: false,
	     async: false,
		data:{'cardNo1':cardNo1},
		success:function(result){
			if(result.code!=100){
				policeCardNo1flag=false;
		}
	 },
	 error: function() { 
		 show_validate_msg("验证发卡卡号1失败!,请联系管理员");
		} 
	});
	return policeCardNo1flag;
}
//提示框显示信息
function show_validate_msg(msg){
	var extendMsg="<span style='font-weight:bold; font-size:14px'>"+msg+"</span>";
	$.jBox.info(msg,"错误" );
}
</script>
</html>
